package com.gec.teams.wechat.config;

import com.rabbitmq.client.ConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
//连接RabbitMQ需要用到ConnectionFactory
public class RabbitMQConfig {
    @Bean
    public ConnectionFactory getFactory(){
        ConnectionFactory factory=new ConnectionFactory();
        factory.setHost("127.0.0.1");//主机地址
        factory.setPort(5672);//客户端连接端口号
        return factory;
    }
}